<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="common/common.jsp"%>
<%
	String path = request.getContextPath();
	String scanPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/";
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	String docPath = scanPath + "/MrDoc/";
	System.out.println("BasePath:" + basePath);
%>
<!DOCTYPE >
<html lang="en">
<head>
	<title>自助打印</title>
	<meta charset="utf-8">
	<meta name="description" content="Codester is a free responsive Bootstrap template by Dzyngiri">
	<meta name="keywords" content="free, template, bootstrap, responsive">
	<meta name="author" content="Inbetwin Networks">
	<meta name="_csrf" content="${_csrf.token}"/><meta name="_csrf_header" content="${_csrf.headerName}"/>
	<link rel="stylesheet" href="${ss}/css/bootstrap.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${ss}/css/bootstrap-select.css" type="text/css" >
	<link rel="stylesheet" href="${ss}/css/responsive.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${ss}/css/sdses.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${ss}/css/touchTouch.css" type="text/css" media="screen">
	<link rel='stylesheet' href='${ss}/css/googleapis.css'  type='text/css'>
	<script type="text/javascript" src="${ss}/js/js/jquery.js"></script>
	<!-- 轮换图片菜单 -->
	<script type="text/javascript" src="${ss}/js/js/jquery.flexslider-min.js"></script>

	<!-- 动画效果扩展 -->
	<script type="text/javascript" src="${ss}/js/js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="${ss}/js/js/jquery.cookie.js"></script>
	<script type="text/javascript" src="${ss}/js/js/touchTouch.jquery.js"></script>
	<script type="text/javascript" src="${ss}/js/js/bootstrap.js"></script>
	<script type="text/javascript" src="${ss}/js/js/bootstrap-select.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/numberkey.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/verifymessage.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/progressbar.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/stampprint.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/stampocx.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/M607.js"></script>
	<script type="text/javascript" src="${ss}/js/sfz/warn.js"></script>
	<script type="text/javascript">if($(window).width()>1024){document.write("<"+"script src='${ss}/js/js/jquery.preloader.js'></"+"script>");}	</script>
	<script language="javascript" src="${ss}/js/LodopFuncs.js"></script>
	<script type="text/javascript" src="${ss }/js/sockjs.min.js"></script>
	<script type="text/javascript" src="${ss }/js/stomp.js"></script>
	<script type="text/javascript" src="${ss }/js/socket.js"></script>
	<script type="text/javascript" src="${ss }/js/sfz/countdown.js"></script>
	<script type="text/javascript" src="${ss }/js/sfz/checkCard.js"></script>
	<script>
        jQuery(window).load(function() {
            $x = $(window).width();
            if($x > 1024)
            {
                jQuery("#content .row").preloader();
            }
			jQuery('.magnifier').touchTouch();
			jQuery('.spinner').animate({'opacity':0},1000,'easeOutCubic',function (){jQuery(this).css('display','none')});
        });
	</script>


</head>

<body  onclick="updateTime()">
<!--start 背景图片  -->
<input type="hidden" id="printerIp" value="${machineID.printerIp}">
<input type="hidden" id="bjtp" >
<input type="hidden" id="bjyy" >
<input type="hidden" id="failure">
<input type="hidden" id="qrcode_fs">
<input type="hidden" id="paymentVoucher">
<input type="hidden" id="pid">
<img style="position:absolute;left:0px;top:0px;width:100%;height:100%;z-Index:-1; border:0px solid blue" src="img/zzdy.jpg" />
<!--end 背景图片  -->

<!-- start 身份证验证 -->
<div id="crdiv" class="modal_ modal_stamp">
	<div class="div_font1"><font class="font1" >自助打印机</font></div>
	<div class="div_font2"><font class="font2">请将身份证放置于读卡区</font></div>
	<div class="div_font3"><font class="font3"></font></div>
	<input type="hidden" id="card_read" >
</div>
<!-- end 身份证验证 -->
<div class="modal hidden"><img src='${ss }/img/slyy_.png'></div>
<div class="modal_tip" id="modal_tip">
	<table>
		<tr class="div_tip"><td height="50px" colspan="2" valign="top" style="font-weight: 900;font-size: 30px;">友情提示：</td></tr>
		<tr class="div_tip"><td valign="top" class="first_td">1.</td><td>将身份证放置于读卡区。</td></tr>
		<tr class="div_tip"><td valign="top" class="first_td">2.</td><td>点击“发送验证码”按钮，系统将验证码发送至本人住院时留存的手机号码上。</td></tr>
		<tr class="div_tip"><td valign="top" class="first_td">3.</td><td>通过验证后，选择所需病案用途及份数。</td></tr>
		<tr class="div_tip"><td valign="top" class="first_td">4.</td><td>打印成功后，在门诊卡扣除打印费用。</td></tr>
	</table>
</div>

<!--start 隐藏 -->
<input type="hidden" value="" id="choice">
<input type="hidden" value="49557184-0" id="orgcode">
<input type="hidden" id="link_phone" value="15665868859">
<input type="hidden" id="idcard_">
<input type="hidden" id="basepath" value="<%=basePath%>">
<input type="hidden" id="docPath" value="<%=docPath%>">
<input type="hidden" id="validationCode">
<input type="hidden" id="onlyId">
<input type="hidden" id="outpatient">
<input type="hidden" id="mobileNumber">
<input type="hidden" id="patientId">
<input type="hidden" id="balance">
<input type="hidden" id="outTradeCode">
<!-- end 隐藏 -->

<!--start 患者信息验证 -->
<div id="sfzdiv" class="modal_1 hide">
	<div class="div_sfz">
		<table style="float:left">
			<tbody>
			<tr>
				<td style="width:100px;height:50px;"><font class="font4">姓名</font></td>
				<td style="width:100px;height:50px;" colspan='3'><span class="font9" id="name"></span></td>
				<td  rowspan='4' style="width:200px;height:170px;"><img  id="dispHead" src="" style="width: 131px; height: 158px" name="dispHead"/></td>
			</tr>
			<tr>
				<td style="width:100px;height:30px;"><font class="font4">性别</font></td><td style="width:100px;height:30px;"><font class="font9" id="sex"></font></td>
				<td style="width:100px;height:30px;"><font class="font4">民族</font></td><td style="width:100px;height:30px;"><font class="font9" id="nation_"></font></td>
			</tr>
			<tr><td style="width:100px;height:30px;"><font class="font4">出生</font></td><td colspan='3'><font class="font9" id="birthday"></font></td></tr>
			<tr><td style="width:100px;height:30px;"><font class="font4">住址</font></td><td colspan='3'><font class="font6" id="address"></font></td></tr>
			<tr><td colspan='2' style="height:40px;"><font class="font4">公民身份证号码</font></td><td colspan='3'><font class="font9" id="idcard"></font></td></tr>
			</tbody>
		</table>
	</div>
	<div id="div_validation">
		<div class="div_zyxx">
			<input type="hidden" disabled="disabled" placeholder="请输入病案号" id="dy_banum" name="banum">
		</div>
		<div class="div_zyxx">
			<font class="font7">验证码：</font>
			<input type="text" class="input-small" placeholder="输入验证码" id="dy_validation" name="validation" style="margin-bottom:15px!important">
			<input type="hidden" id="dy_phone" name="phone">
			<input type="button" class="btn btn-large btn-block2" id="send" style="width:170px;margin-bottom:15px!important" value="获取验证码" >

		</div>
		<div class="div_zyxx">
			<span class="font10">发至留存手机号：</span>
			<span class="font10" id="span_phone"></span>
		</div>
		<div class="div_button_1">

			<input class="btn-info btn btn_send" type="button" value="  返回主页面		" onclick="back()">
		</div>
	</div>
</div>
<!--end 患者信息验证 -->

<!--start 未成年人信息验证 -->
<div id="nonagediv" class="modal_1 hide">
	<div class="div_sfz">
		<table style="float:left">
			<tbody>
			<tr>
				<td style="width:100px;height:50px;"><font class="font4">代办人</font></td>
				<td style="width:100px;height:50px;" colspan='3'><span class="font9" id="agent"></span></td>
				<td  rowspan='4' style="width:200px;height:170px;"><img  id="agentHead" src="" style="width: 131px; height: 158px" name="agentHead"/></td>
			</tr>
			<tr>
				<td style="width:100px;height:30px;"><font class="font4">性别</font></td><td style="width:100px;height:30px;"><font class="font9" id="agentsex"></font></td>
				<td style="width:100px;height:30px;"><font class="font4">民族</font></td><td style="width:100px;height:30px;"><font class="font9" id="agentnation"></font></td>
			</tr>
			<tr><td style="width:100px;height:30px;"><font class="font4">出生</font></td><td colspan='3'><font class="font9" id="agentbirthday"></font></td></tr>
			<tr><td style="width:100px;height:30px;"><font class="font4">住址</font></td><td colspan='3'><font class="font6" id="agentaddress"></font></td></tr>
			<tr><td colspan='2' style="height:40px;"><font class="font4">公民身份证号码</font></td><td colspan='3'><font class="font9" id="agentidcard"></font></td></tr>
			</tbody>
		</table>
	</div>
	<div id="nonageCard">
		<div class="div_zyxx">
			<font class="font7">请输入儿童身份证号：</font>
		</div>
		<div class="div_zyxx">
			<input type="text" class="input_nonage" id="nonage_card">
		</div>
	</div>
	<div id="div_nonage" class="hidden">
		<div class="div_zyxx">
			<input type="hidden" disabled="disabled" placeholder="请输入病案号" id="nonage_banum" name="banum">
		</div>
		<div class="div_zyxx">
			<font class="font7">验证码：</font>
			<input type="text" class="input-small" placeholder="输入验证码" id="nonage_validation" name="validation" style="margin-bottom:15px!important">
			<input type="hidden" id="nonage_phone" name="phone">
			<input type="button" class="btn btn-large btn-block2" id="nonageSend" style="width:170px;margin-bottom:15px!important" value="获取验证码" >

		</div>
		<div class="div_zyxx">
			<span class="font10">发至留存手机号：</span>
			<span class="font10" id="span_nonagePhone"></span>

		</div>

	</div>
	<div class="div_button_1">
		<input class="btn-info btn btn_send" type="button" value="  返回主页面		" onclick="back()">
	</div>
</div>
<!--end 未成年人信息验证 -->

<!-- start 输入框 -->
<div id="div_key" class="modal_key modal hide">
	<table class="table_key" >
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-7" value="7"></td>
			<td ><input type="button" class="btn btn_key" id="key-8" value="8"></td>
			<td ><input type="button" class="btn  btn_key" id="key-9" value="9"></td>
		</tr>
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-4" value="4"></td>
			<td ><input type="button" class="btn  btn_key" id="key-5" value="5"></td>
			<td ><input type="button" class="btn  btn_key" id="key-6" value="6"></td>
		</tr>
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-1" value="1"></td>
			<td ><input type="button" class="btn  btn_key" id="key-2" value="2"></td>
			<td ><input type="button" class="btn  btn_key" id="key-3" value="3"></td>
		</tr>
		<tr class="oneselftr">
			<td ><input type="button" class="btn  btn_key" id="key-clear" value="清除"></td>
			<td ><input type="button" class="btn  btn_key" id="key-0" value="0"></td>
			<td ><input type="button" class="btn  btn_key" id="key-del" value="←"></td>
		</tr>
		<tr class="oneselftr">
			<td colspan="3"><input type="button" class="btn btn_queren  btn_key" type="button" value="  确     认    " id="confirm_"></td>
		</tr>
		<tr class="agenttr hide">
			<td ><input type="button" class="btn  btn_key" id="key-X" value="X"></td>
			<td ><input type="button" class="btn  btn_key" id="key-0-agent" value="0"></td>
			<td ><input type="button" class="btn  btn_key" id="key-del-agent" value="←"></td>
		</tr>
		<tr class="agenttr hide">
			<td ><input type="button" class="btn  btn_key" id="key-clear-agent" value="清除"></td>
			<td colspan="2"><input type="button" style="width:244px!important" class="btn btn_key" value="  确     认    " id="confirm_agent"></td>
		</tr>
	</table>
</div>

<!-- end 输入框 -->

<!-- start 打印界面-->
<div id="myModal" class="modal  modal_dy hide">
	<div class="modal_top">

	</div>
	<div class="modal_banum">
		<table style="float:left; text-align: center;" class="table_group">
			<thead>
			<tr>
				<th style="width:60px;"></th>
				<th style="width:60px;">选择</th>
				<th style="width:95px;">标识码</th>
				<th style="width:95px;">病案号</th>
				<th style="width:165px;text-align: center;">姓名</th>
				<th style="width:105px;">入院日期</th>
				<th style="width:105px;">出院日期</th>
				<th style="width:197px;">出院科室</th>
			</tr>
			</thead>
			<tbody id="table_banum">



			</tbody>

		</table>
	</div>
	<div class="modal_yt">
		<font class="font7">病案用途：</font>
		<div class="combination" id="div_combination">
			<c:forEach items="${combinations}" var="comb" varStatus="vs">
				<div class="combination_left" id="checkbox_number_${comb.id }" onclick="click_check(this.id)">
					<c:choose>
						<c:when test="${comb.combination=='门规'}">
							<input id="number_checkbox_${comb.id }" combinationId="${comb.id }" checked='checked' value="${comb.combinationContent }" name="combination_checkbox" class="checkbox_" type="checkbox">
						</c:when>
						<c:otherwise>
							<input id="number_checkbox_${comb.id }"  combinationId="${comb.id }"  value="${comb.combinationContent }" name="combination_checkbox" class="checkbox_" type="checkbox">
						</c:otherwise>
					</c:choose><span class="font7">${comb.combination }</span>
				</div>
			</c:forEach>
		</div>
	</div>



	<div class="modal_fs">
		<font class="font7"> 打印份数： </font>
		<input type="hidden" class="input-small input_fs" disabled="disabled"  id="input_fs" >
	</div>
	<div class="modal_btn_fs_">
		<%--<input type="button" class="btn btn_fs" id="fs_1" value="打   印" style="width:260px!important;height:50px!important;">--%>
		<input type="button" class="btn btn_fs" id="fs_1" value="1">
		<input type="button" class="btn btn_fs" id="fs_2" value="2">
		<input type="button" class="btn btn_fs" id="fs_3" value="3">
		<input type="button" class="btn btn_fs" id="fs_4" value="4">
		<input type="button" class="btn btn_fs" id="fs_5" value="5">
	</div>

	<input  value="0" id="dvdChoice" type="hidden">

	<div id="progress_bar" class="div_progressbar"></div>
</div>
<!-- end 打印界面-->


<!-- start 支付界面-->
<div id="paymentModal" class="payscan hidden">
	<div class="modal_top_payscan">
		打印费用：<font class="font19" id="hdfy"></font>元<br>
		门诊卡号：<font class="font19" id="payCardno"></font><br/>账户余额：<font class="font19" id="payBalance"></font>元<br>
	</div>

	<div id="pay_balance">
		<div style=" text-align: center;">
			<input type="button" id="btn_balance" class="btn-info btn btn_pay"	value="确认">
			<input type="button" id="btn_close_1" class="btn-info btn btn_pay" value="取消"></div>
		<div class="modal_buttom_payscan">
			请按确认，继续打印。<br/>打印完成，将在门诊卡扣除打印费用！
		</div>
	</div>
	<div id="pay_type" class="hidden">
		<div class="modal_top_payscan">
			门诊卡内余额不足,请充值
		</div>
		<div class="pay_modal_scan hidden" id="pay_qr">
			<div id="alipay_loading" class="loading">正在生成二维码...</div>
		</div>

		<div style=" text-align: center;">
			<input type="button" class="btn-info btn btn_pay" id="pay_1"	value="支付宝">
			<input type="button" class="btn-info btn btn_pay" id="pay_2" value="微信">
			<input type="button" id="btn_close_2" class="btn-info btn btn_pay" value="取消">
		</div>
		<div class="modal_buttom_payscan">
			支付成功，将充值到门诊卡<br/>请等候1分钟左右开始打印<br/>打印完成，将在门诊卡扣除打印费用！
		</div>
	</div>

</div>



<div class="spinner"></div>
<!-- start 身份证读卡器-->
<input type="hidden" id="partyName" value="">
<input type="hidden" id="gender" ><!-- (取值为“1”（表示“男”）或“0”（表示“女”）) -->
<input type="hidden" id="nation" >
<input type="hidden" id="bornDay" >
<input type="hidden" id="certAddress" >
<input type="hidden" id="certNumber" value="">
<input type="hidden" id="certOrg">
<input type="hidden" id="effDate">
<input type="hidden" id="expDate">
<input type="hidden" id="result">
<input type="hidden" id="headBase64DataLen">
<input type="hidden" id="finPath1">
<input type="hidden" id="finPath2" >
<input id="headBase64Data" type="hidden">
<input type="hidden" id="timeElapsed" >
<input type="hidden" id="samID">
<input type="hidden" id="headPath" >
<input type="hidden" id="hasFinger" >
<input type="hidden" id="operationId">
<input type="hidden" id="nonage">
<div class="button_close hide"  id="fq_dy">
	<input type="button" class="btn-info btn btn_nonage" onclick="fq_dy()" value="放弃病案打印">
</div>
<div class="button_close"  id="nonageIngress">
	<input type="button" class="btn-info btn btn_nonage" onclick="nonageIngress()" value="未领身份证16岁以下儿童入口">
</div>
<!--神思身份证读卡器  -->
<script type="text/javascript" src="js/sfz/sdses.js"></script>
<OBJECT
		classid="clsid:F1317711-6BDE-4658-ABAA-39E31D3704D3"
		codebase="SDRdCard.cab#version=1,0,98,0"
		width=0
		height=0
		align=center
		hspace=0
		vspace=0
		name=rdcard
>
</OBJECT>
<%--id=idcard--%>
<object id="stampocx" width="0" height="0" classid="clsid:B171AE51-CB83-4049-93AE-D1100E1104BE"></object>
<object id="ptrocx" width="0" height="0" classid="clsid:52E098EE-805E-4E26-8E0E-33DABD1DF7FA"></object>
</body>
</html>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     